home *** CD-ROM | disk | FTP | other *** search
- Subject: How to use 'diff' (was Re: Sticky Text Patches)
- Date: Mon, 4 Jul 1994 09:30:37 -0400 (EDT)
- From: Chris Herborth <herborth@53iss6.waterloo.ncr.com>
- In-Reply-To: <94Jul1.125546mesz.209301@hphalle0.informatik.tu-muenchen.de> from "Stephan Haslbeck" at Jul 1, 94 01:55:38 pm
- Message-Id: <9407040934.ac19135@ncrhub1.NCR.COM>
-
- What you wrote:
- > So I added some prot_temp()-calls in fork_restore(), and now it
- > works fine. I've marked the lines below (Sorry, no diff, because I
- > don't know (yet) how to use it).
-
- How To Use Diff
-
- 1) BEFORE you edit foo.c, do this:
- - mv foo.c foo.c.orig
- - cp foo.c.orig foo.c
- This leaves you with an unaltered original. This is very important!
-
- 2) AFTER you're done editing foo.c (ie, you've hacked it, tested it,
- it works properly), do this:
- - diff -c foo.c.orig foo.c > foo.diff
-
- -c means "context", which gives the changes a little extra info so
- patch can figure out what to do if you try to use the diffs on a changed
- file.
-
- Now you've got a nice context-diff in the file foo.diff; the changes in
- foo.diff can be applied by going:
-
- patch -l < foo.diff
-
- -l means "loose", which ignores end-of-line differences; very handy if
- some of your tools do silly things like converting the UNIX text to DOS
- text (@#$@# MicroEMACS 3.11 does this, my unreleased MiNT port of 3.12
- doesn't).
-
- > P.S. This is the first time I mail to this list, so tell me if I did
- > something wrong.
-
- Looked fine to me (but I didn't check your code; I'm not a kernel hacker)!
-
- --
- ----------========================_ /\ ============================----------
- Chris Herborth \`o.0' herborth@53iss6.Waterloo.NCR.COM
- Information Products Developer =(___)=
- AT&T Global Information Solutions U
-